#ifndef MYTOPLABEL_H
#define MYTOPLABEL_H

#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>

class MyTopLabel : public QLabel
{
    Q_OBJECT
public:
    MyTopLabel(QWidget *parent = nullptr);
    ~MyTopLabel();

    void updateTime();

protected:
    void resizeEvent(QResizeEvent *event) override;     // 重写 resizeEvent 事件处理函数

signals:
    void sigToClose();  //关闭程序
    void sigShowMin();

private:
    QLabel *m_timeLabel;
    QLabel *m_nameLabel;
    QPushButton *m_exitButton;
    QHBoxLayout *m_topLayout;
    QPushButton *m_minButton;
};

#endif // MYTOPLABEL_H
